CREATE TABLE jms_dm.dm_customer_loss_net_sum_dt(
  sender_network_code    varchar(200) null COMMENT '寄件(揽收)网点code'
  ,customer_code         varchar(200) null COMMENT '客户code'
  ,date_time             date         null COMMENT '申请时间'
  ,sender_network_name   varchar(200) null COMMENT '寄件(揽收)网点名称'
  ,customer_name         varchar(200) null COMMENT '客户名称'
  ,waybill_sum           bigint(10)   null COMMENT '遗失件量'
) ENGINE=OLAP
DUPLICATE KEY(`sender_network_code`, `customer_code`, `date_time`, `sender_network_name`, `customer_name`)
COMMENT "遗失件网点客户汇总表"
PARTITION BY RANGE(`date_time`)
(START ('2023-03-01') END ('2023-04-20') EVERY (INTERVAL 1 day) )
DISTRIBUTED BY HASH(`sender_network_code`, `customer_code`) BUCKETS 10
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-35",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "10",
"in_memory" = "false",
"storage_format" = "V2"
);